class BootStrap {

     def init = { servletContext ->
         // User
         User user = new User(name:"최종욱",
             email:"choi@gmail.com", password:"pass")
         user.save()
         new User(name:"장민석", email:"jang@gmail.com",
             password:"pass").save()

         // Plan
         Plan nyPlan = new Plan(name:'New York')
         user.addToPlans(nyPlan)
         Plan washingtonDcPlan = new Plan(name:'Washington D.C.')
         user.addToPlans(washingtonDcPlan)
         washingtonDcPlan.save()

         // Places
         Place statue = new Place(name:'Statue of Liberty',
             latitude:40.693889, longitude:-74.043611, wikipediaEntry:'Statue_of_Liberty')
         statue.save()
         Place centralPark = new Place(name:'Central Park',
             latitude:40.781944, longitude:-73.966111, wikipediaEntry:'Central_Park')
         centralPark.save()
         Place empireStateBuilding = new Place(name:'Empire State Building',
             latitude:40.748433, longitude:-73.985655, wikipediaEntry:'Empire_State_Building')
         empireStateBuilding.save()

         Place wtc = new Place(name:'World Trade Center',
             latitude:40.711667, longitude:-74.0125, wikipediaEntry:'World_Trade_Center')
         wtc.save()

         // Plan items
         nyPlan.addToItems(new PlanItem(place:statue, date:new Date()))
         nyPlan.addToItems(new PlanItem(place:centralPark, date:new Date()))
         nyPlan.addToItems(new PlanItem(place:empireStateBuilding, date:new Date()))

         user.save()
         nyPlan.save()

         // Currency
         MyCurrency dollar = new MyCurrency(shortName:'USD',
             fullName:'Japanese yen', sign:'$',
             unitAmount:1, perDollar:1d)
         dollar.save()

         // Country
         Country usa = new Country(name:'United States of America', currency:dollar)
         usa.save()

         
     }
     def destroy = {
     }
} 